import { BasePageReq, BasePageResp, BaseParam } from "../base";
import { Address } from "../address/type";

export interface CreateOrderReq {
  goodsId: number;
  addressId: number;
  remark?: string;
}

export interface OrderPay {
  orderNo: string;
  payMethod: string;
}

export interface Order extends BaseParam {
  orderNo: string;
  goodsId: number;
  goodsName: string;
  goodsCategory: string;
  goodsPrice: number;
  buyerId: number;
  buyerName: string;
  sellerId: number;
  sellerName: string;
  address: Address;
  payStatus: number;
  status: number;
  payTime: string;
  remark?: string;
}

export interface OrderReq extends BasePageReq {
  keyword?: string;
  status?: number;
  categoryId?: number;
}

export interface OrderRes extends BasePageResp {
  records: Order[];
}